package com.github.chirspan.xaas.mybatis.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @className: DeleteOption
 * @description: <p>mybatis删除配置注解</p>
 * @author: chenpan
 * @date: 2021/6/29 10:07
 **/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DeleteOption {

    /**
     * 是否删除关联表数据
     *
     * @return
     */
    boolean deleteRelation() default true;

    /**
     * 关联类的mapper
     *
     * @return
     */
    Class<?> relationMapper();

    /**
     * 关联类的关联字段(数据库字段)
     *
     * @return
     */
    String relationField();
}
